#include <stdio.h>
#include <string.h>
#include <stdlib.h>

typedef struct A
{
	int num;
}A;

typedef struct B
{	
	int num;
	char type;
	int age;
}B;


int main()
{
	A a;
	B * b;

	char * tmp1;
	int * tmp2;

	a.num = 1;

	tmp1 = (char *)(&(a.num));
	printf("%c\n", *tmp1);
	tmp1  = tmp1 + 4;
//	printf("%c\n", *tmp1);
	*tmp1 = 'a';
//	printf("%c\n", *tmp1);

	tmp2 = (int *)(&(a.num));
//	printf("%d\n", *tmp2);
	tmp2 = tmp2 + 2;
//	printf("%d\n", *tmp2);
	*tmp2 = 100;
//	printf("%d\n", *tmp2);

	b = (B *)(&a);
	printf("b->num = %d b->type = %c b->age = %d\n", b->num, b->type, b->age);


	return 0;
}


